import axios from '@/utils/request';
const baseUserURL = process.env.VUE_APP_USER_API;

// 默认方式
const demoGet = () => {
  return axios.get(baseUserURL + '/userList');
};

// 自定义请求方式
const demoPut = data => {
  return axios.request({
    method: 'PUT',
    url: baseUserURL + '/user/realNameAuthentication',
    data,
    headers: {
      hideLoading: true, //是否隐藏loading true 隐藏 false 显示
      loadingText: encodeURI('实名认证中，请稍候...'), //loading加载文字
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });
};

export { demoGet, demoPut };
